export type OperateType = NaiveUI.TableOperateType | 'add';

export function AddRoleMenuArry(arry: number[], item: number) {
  if (!arry.includes(item)) {
    arry.push(item);
  }
  return arry;
}
export function RemoveRoleMenuArry(arry: number[], item: number) {
  if (arry.includes(item)) {
    console.log(item);
    const index = arry.findIndex(a => a === item);
    arry.splice(index, 1);
    console.log(arry);
  }

  return arry;
}
export function AddRolePermArry(arry: string[], item: string) {
  if (!arry.includes(item)) {
    arry.push(item);
  }
  return arry;
}
export function RemoveRolePermArry(arry: string[], item: string) {
  if (arry.includes(item)) {
    const index = arry.findIndex(a => a === item);
    arry.splice(index, 1);
  }
  return arry;
}
